//package com.ruoyi.framework.config;
//
//import com.ruoyi.framework.interceptor.IPWhitelistInterceptor;
//import com.ruoyi.framework.interceptor.TokenValidationInterceptor;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//import javax.annotation.Resource;
//
//@Configuration
//public class WebMvcConfig implements WebMvcConfigurer {
//
//    @Resource
//    private IPWhitelistInterceptor ipWhitelistInterceptor;
//
//    @Resource
//    private TokenValidationInterceptor tokenValidationInterceptor;
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        // IP白名单拦截器
//        registry.addInterceptor(ipWhitelistInterceptor)
//                .addPathPatterns("/data/realtime/receive");
//
//        // Token验证拦截器
//        registry.addInterceptor(tokenValidationInterceptor)
//                .addPathPatterns("/data/realtime/receive");
//    }
//}